/*
*  Copyright 2019-2025 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.controller.store;



import lombok.RequiredArgsConstructor;
import java.util.List;

import me.zhengjie.server.StoreLocalService;
import me.zhengjie.utils.PageResult;
import me.zhengjie.vo.task.TaskViewQueryCriteria;
import me.zhengjie.vo.task.TaskViewVo;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;


/**
* @author laoxu
* @date 2025-07-07
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "TaskViewController")
@RequestMapping("/api/taskView")
public class TaskViewController {

   private final StoreLocalService storeLocalService;

    @GetMapping
    @ApiOperation("查询TaskViewController")
    @PreAuthorize("@el.check('taskView:list')")
    public ResponseEntity<PageResult<TaskViewVo>> queryTaskView(TaskViewQueryCriteria criteria){
        Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
        return new ResponseEntity<>(storeLocalService.queryAllTaskStatusChange(criteria,page),HttpStatus.OK);
    }

}